﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class UserControl_UCDangKyDangNhap : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["TenDangNhap"] != "" && Session["MaTaiKhoan"].ToString() != "")
        {
            lnkLoginStatus.Text = Session["TenDangNhap"].ToString();
            lnkRegister.Text = "Đăng xuất";
            lnkLoginStatus.NavigateUrl = "~/TrangCaNhan.aspx?TaiKhoanID=" + Session["MaTaiKhoan"];
            lnkRegister.NavigateUrl = "~/Refresh.aspx";
        }
        else
        {
            lnkLoginStatus.Text = "Đăng nhập";
            lnkRegister.Text = "Đăng ký";
            lnkLoginStatus.NavigateUrl = "~/DangNhap.aspx";
            lnkRegister.NavigateUrl = "~/DangKy.aspx";
        }
    }
}
